package com.tanhua.db.api;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tanhua.api.BlackListApi;
import com.tanhua.db.mapper.BlackListMapper;
import com.tanhua.model.pojo.BlackList;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class BlackListApiImpl implements BlackListApi {

    @Autowired
    private BlackListMapper blackListMapper;

    @Override
    public void deleteBlacklist(Long userId, Long blackUserid) {
        blackListMapper.delete(Wrappers.lambdaQuery(BlackList.class)
                .eq(BlackList::getUserId, userId)
                .eq(BlackList::getBlackUserId, blackUserid));
    }
}
